-- victor_dignity
-- created by panyl
-- 只有单个敌人时，属性+N%

return {
    apply = function(prop, baseValue)
        if 1 ~= #FormulaM.getAliveMonsters(true) then
            ME.user.dbase:setTemp("victor_dignity", 0);
            return 0;
        end

        local v = math.modf(baseValue * prop[3] / 1000);
        v = math.max(1, v);
        local temp  = ME.user.dbase:queryTemp("victor_dignity", 0);

        ME.user.dbase:setTemp("victor_dignity", 1);
        if temp <= 0 then
            EventMgr.fire(event.SPECIAL_SKILL_TRIGGER, { propId = prop[1] });
        end

        return v;
    end,

    record = function(target, prop, path)
        return false;
    end
};